1. Field of the Invention
The resent invention relates to improving images for inspection purposes and more particularly to applying an illumination compensation to the images to correct smooth intensity variations due to illumination changes.
2. Description of the Prior Art
Automatic visual inspection of parts for defect detection in the manufacturing process is one of the most important applications in machine vision. The performance of an automatic visual inspection system can be determined by its reliability, efficiency and generality. An automatic inspection system needs to be reliable under different illumination conditions and under noisy environments. The reliability of an inspection system, which is usually characterized by its false alarm rate, is very crucial to the quality control in the manufacturing process. The efficiency of an automatic inspection system is also important since it is directly related to the throughput of the production. In addition, the automatic inspection system should be general enough to perform different kinds of inspection tasks.
A number of methods have been proposed for automatic visual inspection. These are described by R. T. Chin in xe2x80x9cAutomatic Visual Inspection: 1981 to 1987xe2x80x9d, Computer Vision, Graphics, and Image Processing, Vol. 41, No. 3, pp. 346-381, 1988; by T. S. Newman and A. K. Jain in xe2x80x9cA Survey Of Automatic Visual Inspectionxe2x80x9d, Computer Vision and Image Understanding, Vol. 61, No. 2, pp. 231-262, 1995; and by B. E. Dom and V. Brecher in xe2x80x9cRecent Advances In The Automatic Inspection Of Integrated Circuits For Pattern Defectsxe2x80x9d, Machine Vision and Applications, Vol. 8, pp. 5-19, 1995. They can be roughly categorized into two approaches namely, the image reference approach and the design-rule verification approach. The image reference or image subtraction approach compares every pixel in the inspection image with the corresponding pixel in the reference image, which is sensed defect-free image or a synthetically generated image from a CAD model. The design-rule verification approach checks for the violation of a set of generic rules, such as design width and spacing standards, in the image. The image reference approach is very popular in automatic visual inspection due to its general applicability to a wide variety of different inspection tasks. However, it requires very precise alignment of the inspection pattern in the image. Although the design-rule verification approach does not need very accurate alignment, it usually requires a complicated system design for each individual inspection task, which makes it more difficult to use in practice.
A major problem with the prior art image reference approaches are their sensitivity to illumination changes. An image reference inspection system usually requires the same illumination condition during the inspection. Different illumination conditions may lead to large deviation between the inspection image and the reference image. This deviation may occur all over the image domain. Thus the existing, prior art, image reference system is not robust against illumination changes.
It is an object of the present invention to provide a novel and automatic illumination compensation system which can lead to a reliable image reference inspection system that is robust against illumination changes.
The present invention is an illumination compensation system for correcting smooth intensity variations due to illumination changes. The present invention is very useful in achieving a reliable automated visual inspection system under different illumination conditions.
The illumination compensation system of the present invention includes the following. An image brightness functions inputted to a take LOG operator where the logarithm of the image brightness function is taken. In a gradient constraints computer the gradient constraints are computed using a finite difference. In a reliable constrains selector the reliable gradient constraints are selected based on a local uniformity test. In a surface fitting processor a process is subsequently applied to estimate the logarithmic irradiance function. In an image subtractor the logarithmic irradiance function is subtracted from the logarithmic image brightness function. Finally, in a take exponential operator, the exponential operation of the above subtracted image function is taken and the illumination compensated image is outputted from the system.